package com.quickd.service.service.wms.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.quickd.core.common.Const;
import com.quickd.core.enums.MenuTypeEnum;
import com.quickd.core.service.impl.BaseServiceImpl;
import com.quickd.service.entity.wms.StorageBin;
import com.quickd.service.mapper.wms.MaterialMapper;
import com.quickd.service.entity.wms.Material;
import com.quickd.service.service.wms.IMaterialService;
import org.springframework.stereotype.Service;

/**
 * 物料
 *
 * @author quickd quickd@dacanginfo.com
 * @since 2019-10-11
 */
@Service
public class MaterialServiceImpl extends BaseServiceImpl<MaterialMapper, Material> implements IMaterialService {

    @Override
    public Material queryByCode(String code) {
        QueryWrapper<Material> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(Material::getCode, code);
        return  (Material)baseMapper.selectOne(queryWrapper);
    }
}